package com.xiti.student.base.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotations.*;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 图片
 * </p>
 *
 * @author tangz
 * @since 2018-07-08
 */
@ApiModel(value = "Image", description = "图片")
@TableName("tb_base_image")
public class Image implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(name = "id", value = "主键ID", dataType = "Long", notes = "")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(name = "groupId", value = "组ID(uuid_关联图片表的存储这个字段)", dataType = "String", notes = "")
    private String groupId;

    @ApiModelProperty(name = "name", value = "图片名称", dataType = "String", notes = "")
    private String name;

    @ApiModelProperty(name = "types", value = "图片类型(10商品头图/20商品详情图/30资讯图片/40病历图片）", dataType = "Integer", notes = "")
    private Integer types;

    @ApiModelProperty(name = "sort", value = "排序", dataType = "Long", notes = "")
    private Long sort;

    @ApiModelProperty(name = "tag", value = "标记", dataType = "Integer", notes = "")
    private Integer tag;

    @ApiModelProperty(name = "imageUrl", value = "图片地址", dataType = "String", notes = "")
    private String imageUrl;

    @ApiModelProperty(name = "linkUrl", value = "链接地址", dataType = "String", notes = "")
    private String linkUrl;

    @ApiModelProperty(name = "remark", value = "说明", dataType = "String", notes = "")
    private String remark;

    @ApiModelProperty(name = "createdCode", value = "创建者账号", dataType = "String", notes = "")
    @TableField(fill = FieldFill.INSERT)
    private String createdCode;

    @ApiModelProperty(name = "createdName", value = "创建者名称", dataType = "String", notes = "")
    @TableField(fill = FieldFill.INSERT)
    private String createdName;

    @ApiModelProperty(name = "createdTime", value = "创建时间", dataType = "Date", notes = "")
    @TableField(fill = FieldFill.INSERT)
    private Date createdTime;

    @ApiModelProperty(name = "lastCode", value = "最后更新者账号", dataType = "String", notes = "")
    @TableField(fill = FieldFill.UPDATE)
    private String lastCode;

    @ApiModelProperty(name = "lastName", value = "最后更新者名称", dataType = "String", notes = "")
    @TableField(fill = FieldFill.UPDATE)
    private String lastName;

    @ApiModelProperty(name = "lastTime", value = "最后更新时间", dataType = "Date", notes = "")
    @TableField(fill = FieldFill.UPDATE)
    private Date lastTime;

    @ApiModelProperty(name = "deleteFlag", value = "删除标记0未删除1已删除", dataType = "Integer", notes = "")
    @JSONField(serialize=false)
    @TableLogic
    private Integer deleteFlag;

    @ApiModelProperty(name = "version", value = "版本号", dataType = "Integer", notes = "")
    @JSONField(serialize=false)
    @Version
    private Integer version;



    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getGroupId() {
        return groupId;
    }

    public void setGroupId(String groupId) {
        this.groupId = groupId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getTypes() {
        return types;
    }

    public void setTypes(Integer types) {
        this.types = types;
    }

    public Long getSort() {
        return sort;
    }

    public void setSort(Long sort) {
        this.sort = sort;
    }

    public Integer getTag() {
        return tag;
    }

    public void setTag(Integer tag) {
        this.tag = tag;
    }

    public String getImageUrl() {
        return imageUrl;
    }

    public void setImageUrl(String imageUrl) {
        this.imageUrl = imageUrl;
    }

    public String getLinkUrl() {
        return linkUrl;
    }

    public void setLinkUrl(String linkUrl) {
        this.linkUrl = linkUrl;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCreatedCode() {
        return createdCode;
    }

    public void setCreatedCode(String createdCode) {
        this.createdCode = createdCode;
    }

    public String getCreatedName() {
        return createdName;
    }

    public void setCreatedName(String createdName) {
        this.createdName = createdName;
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public String getLastCode() {
        return lastCode;
    }

    public void setLastCode(String lastCode) {
        this.lastCode = lastCode;
    }

    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    public Date getLastTime() {
        return lastTime;
    }

    public void setLastTime(Date lastTime) {
        this.lastTime = lastTime;
    }

    public Integer getDeleteFlag() {
        return deleteFlag;
    }

    public void setDeleteFlag(Integer deleteFlag) {
        this.deleteFlag = deleteFlag;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }

    @Override
    public String toString() {
        return "Image{" +
        ", id=" + id +
        ", groupId=" + groupId +
        ", name=" + name +
        ", types=" + types +
        ", sort=" + sort +
        ", tag=" + tag +
        ", imageUrl=" + imageUrl +
        ", linkUrl=" + linkUrl +
        ", remark=" + remark +
        ", createdCode=" + createdCode +
        ", createdName=" + createdName +
        ", createdTime=" + createdTime +
        ", lastCode=" + lastCode +
        ", lastName=" + lastName +
        ", lastTime=" + lastTime +
        ", deleteFlag=" + deleteFlag +
        ", version=" + version +
        "}";
    }
}
